package com.ray.bean;

import java.util.List;

import com.google.appengine.repackaged.com.google.common.base.Predicate;
import com.mchange.v2.async.StrandedTaskReporting;

import lombok.Data;

@Data
public class ReceiptPaymentRecordBean extends BaseBean {
   private String receivePaymentId;//shou
   private int type;//类型 1 收款   2 付款
   private Double sumMoney;//价格
   private String receiptPaymentMode;//收付款方式
   private String createUserName;//创建人姓名
   private String approvalUserName;//审核人姓名
   private int isCanApproval;//是否可审核
   private String customerName;//收付款方
   private int source;//来源 1 外协  其他出入库记录
   private Integer isVerification ;//是否核销 0 未核销  1 已核销
   private String verificationUser;//核销人
   private String verificationTime;//核销时间
   private Double conversionPrice;//折算金额
   private int payType;//操作方式  1 只保存记录  2 过账审核
   private String relationBank;//关联银行卡号
   private String bank;//所属银行
   private String reason;//收付款事由
   private List<ReceivePaymentDetailRecord> detailList;//收付款明细
   private String typeStr;
   private String sourceStr;
   private String statusStr;
   private String verificationStr;
   private Double invoicePrice;//开票金额
   private String invoiceDate;//开票日期
   private String advancePaymenteceiveId;
   private String actualDay;//实际收付款日期
   
   
   public void setVerificationStr() {
		 if(this.getIsVerification()==1) {
			this.verificationStr="已核销";
		 }else {
			 this.verificationStr="未核销";
		 }
	 } 
   public void setTypeStr() {
		 if(this.getType()==1) {
			this.typeStr="收款";
		 }else {
			 this.typeStr="付款";
		 }
	 }
   
   public void setSourceStr() {
		if(this.getSource()==1) {
			this.sourceStr = "外协";
		}else if(this.getSource()==3) {
			this.sourceStr = "其他费用单";
		}else {
			this.sourceStr = "仓库";
		}
	}
   public void setStatusStr() {
	   if(this.getStatus()==1) {
			this.statusStr = "已审核";
		}else if(this.getStatus()==2) {
			this.statusStr = "已退回";
		}else {
			this.statusStr = "未审核";
		}
		
	}
   
   
   @Data
   public static class ReceivePaymentDetailRecord{
	     private  String  id;//id
	     private  String  inOutId;//出入库id
	     private  Double  price;//收付款进入
	     private  Double  addReducePrice;//增减金额
	     private  int addReduceType;//增减类型 1 增加 2 减少
	     private  String  addReduceReason;//增减原因
	     private  int source;//来源 
	     private  String groupId;//分组编号
	     private Double invoicePrice;//开票金额
	     private  WarehouseInSumMoneyBean warehouseInSumMoneyDetail;
   }
}


